#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int js(x, y)
{
	int i = x;
	int middle = 0;
	int a = 0;
	int b = 0;
	int c = 0;
	for (; i <= y; i++)
	{
		b = 0;
		a = i;
		while (a)
		{
			b += a % 10;
			a /= 10;
			
		}
		if (b % 5 == 0)
		{
			c++;
		}
	}
	return c;
}
int main()
{
	int x = 0;
	int y = 0;
	scanf("%d %d", &x, &y);
	int z = js(x, y);
	printf("%d", z);
	return 0;
}